<template>
	<view class="page-wrap" :data-theme="theme" :class="theme" :style="globalColor.style">
		<HeadCustom ref="HeadCustom" :isSpace="false" :isCircle="true" :isBlur="false" :isBack="isApp" :isOpeninstall="true" :isChange="!isApp"></HeadCustom>
		<view class="download-wrap fboxCol Ycenter">
			<image class="bg" src="https://ebc-prod.cdn.benwunet.com/uni-static/img3.5.0/promotion/bg.gif" mode="widthFix">
			<view class="btn-fixed" v-if="!isApp">
				<DownloadBtn  type="img" :img-url="imgUrl" img-style="width:488rpx;height:162rpx;margin: 0 0 150rpx" :isOpeninstall="true" ref="download_btn" />
			</view>			
			<view v-else class="btn fboxRow Ycenter Xcenter font32" @click="goBack()">返回</view>
		</view>
	</view>
</template>

<script>
	import DownloadBtn from '@/components/download-btn-h5/download_btn.vue';
	export default {
		components: {
			DownloadBtn
		},
		data() {
			return {
				theme: getApp().globalData.appTheme,
				globalColor: getApp().globalData.globalColor,
				// url: '',
				isApplet: false,
				imgUrl: 'https://ebc-prod.cdn.benwunet.com/uni-static/img3.5.0/promotion/btn.png',
				isApp: false,
				linkData: {}
			}
		},
		onLoad(option) {
			if(option && option.isApp){
				this.isApp = true;
			}
			if (option && option.isApplet) {
				this.isApplet = true;
			}
			// const href = window.location.href
			// this.url = href.substr(0, href.lastIndexOf("?"))
		},
		methods: {
			goCopy() {
				uni.setClipboardData({
					data: 'hello',
					success: function() {
						console.log('success');
					}
				});
			},
			goBack(){
				this.$refs.HeadCustom.backTap()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.download-wrap {
		min-height: calc(100vh);
		background: #fff no-repeat top center;
		/* background: #fff url("~@/assets/img/bg-download.jpg") no-repeat top center; */
		background-size: 750rpx 100%;
	}

	.bg {
		width: 750rpx;
		height: auto;
	}

	.logo {
		padding: 30rpx 0;
		width: 112rpx;
		height: 120rpx;
	}

	.logo img {
		width: 112rpx;
		height: 120rpx;
	}

	.download-wrap .title {
		margin-top: 50rpx;
		padding: 0 38rpx;
		color: #09363c;
		line-height: 60rpx;
	}

	.download-wrap .btn-fixed {
		position: fixed;
		width:488rpx;height:162rpx;
		bottom: 0;
		z-index: 6;
	}

	.download-wrap .btn {
		position: fixed;
		bottom: 60rpx;
		left: 50%;
		transform: translateX(-50%);
		width: 560rpx;
		height: 88rpx;
		background: #f0bd42;
		box-shadow: 0px 0px 30rpx 0px rgba(13, 32, 2, 0.2);
		border-radius: 44rpx;
		cursor: pointer;
		border: 0 none;
	}

	.space {
		height: 200rpx;
	}

	.QrCode {
		width: 570rpx;
		height: 556rpx;
		background-color: #fff;
		overflow: hidden;
		border-radius: 28rpx;
	}

	.QrCode .bd {
		margin: 50rpx 0 30rpx;
	}

	.QrCode .code {
		width: 300rpx;
		height: 300rpx;
		overflow: hidden;
	}

	.color-2E2E33 {
		color: #2e2e33;
	}

	.color-8B8B99 {
		color: #8b8b99;
	}

	.download-wrap ::v-deep .van-popup {
		background: none;
	}

	.close {
		margin-top: 60rpx;
	}

	.close .bksIcon {
		font-size: 60rpx;
	}
</style>